package com.woniu.service.impl;

import com.woniu.dao.PayMapper;
import com.woniu.dao.PropertyPaydtoMapper;
import com.woniu.pojo.Pay;
import com.woniu.pojo.Propertypaydto;
import com.woniu.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PayServiceimpl implements PayService {

    @Autowired
    private PayMapper payMapper;

    @Autowired
    private PropertyPaydtoMapper propertyPaydtoMapper;


    @Override
    public List<Propertypaydto> findserviceByPropertyId(Integer propertyid) {
         return  propertyPaydtoMapper.selectByPropertyId(propertyid);
    }

    @Override
    public List<Pay> findserviceByShopId(Integer shopid) {
        return payMapper.selectByShopId(shopid);
    }

    @Override
    public Pay finddetailByPayId(Integer payid) {
        return payMapper.selectByPrimaryKey(payid);
    }

    @Override
    public Integer findpropertyidByUserId(Integer userid) {
           return  payMapper.selectPropertyIdByUserId(userid);

    }


}
